package demo;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2023-03-19
 * Time: 20:34
 */
public class Main12 {
    public static void main(String[] args) {
        int [][]grade = { {80,90,100}, {80,90,95} };
        double []sum = new double[3];
        double []avg = new double[3];
        for(int i=0;i<3;i++){
            for(int j=0;j<2;j++){
                sum[i]+= grade[j][i];
            }
            avg[i] = sum[i]/2;
        }
        System.out.println(Arrays.toString(sum));
        System.out.println(Arrays.toString(avg));
    }


}
